home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / inn-1.4-l / inn-1 / inn-1.4-linux-0.1 / INSTALL < prev    next >
Text File  |  1993-08-22  |  10KB  |  285 lines

  1. Installation instructions for INN 1.4 on Linux
  2. ==============================================
  3.  
  4. by:
  5.     Arjan de Vet <devet@adv.win.tue.nl>
  6.  
  7. with comments and additions from:
  8.  
  9.     Vince Skahan <vince@victrola.wa.com>
  10.  
  11.  
  12. My situation
  13. ------------
  14.  
  15. I'll first describe my situation.
  16.  
  17. My Linux machine is called adv.win.tue.nl. I use a Sun machine called
  18. svin09.info.win.tue.nl at Eindhoven University of Technology as my
  19. UUCP/News host. The MX (mail exchange) record for host adv.win.tue.nl
  20. points to svin09.info.win.tue.nl. svin09 is also the news machine at the
  21. university and it sends me news batches via UUCP.
  22.  
  23.  
  24. Necessary for running INN on Linux
  25. ----------------------------------
  26.  
  27. - A kernel with TCP/IP installed.
  28. - A syslogd daemon running.
  29. - A good /bin/sh shell (see below).
  30. - Some patience...
  31.  
  32.  
  33. Installing INN
  34. --------------
  35.  
  36. IMPORTANT:
  37.  
  38. - DO ALL WORK AS USER news (except starting INN)!!!
  39.  
  40.   You only need to be root to create new or chown existing directories or
  41.   to start innd.
  42.  
  43. - BACKUP YOUR OLD NEWS SYSTEM FIRST!!
  44.  
  45.   If you are running Cnews (or another news system) now, backup everything
  46.   under /usr/lib/news except /usr/spool/news/*. The best thing to do when
  47.   moving from Cnews to INN is to disable any command that could feed you
  48.   new articles before continuing with the installation.
  49.  
  50. - PRINT OUT ALL INN DOCS AND THE INN FAQ AND READ THEM!
  51.  
  52.   Do it!
  53.  
  54.  
  55. Installation steps:
  56.  
  57. 1. untar inn1.4.tar.Z in a directory inn-1.4
  58.  
  59. 2. cd inn-1.4
  60.    patch -p0 < inn-1.4-ctlinnd-patch
  61.  
  62.    This fixes a problem with multiple ctlinnd processes when not using
  63.    Unix Domain Sockets, most visible when receiving a lot of newgroup
  64.    messages simultaneously (e.g., the comp.os.linux reorganization).
  65.  
  66. 3. copy config.data to inn-1.4/config/config.data
  67.  
  68.    Edit the paths in this file. I store almost everything under
  69.    /usr/lib/news.
  70.  
  71. 4. Run the inn-1.4/BUILD script:
  72.  
  73.    - I used the C version of subst.
  74.    - Ignore the messages about lint, just continue.
  75.    - Do not edit the data files right know, install the default ones for
  76.      now.
  77.  
  78.    This will make the binaries and it will setup sample config files in
  79.    inn-1.4/site. It installs these binaries and config files under
  80.    /usr/lib/news.  It will (re)create the history file and the DBZ files
  81.    for you; this can take some time.
  82.  
  83. 5. Now you have to adapt the config files in inn-1.4/site for your
  84.    situation.
  85.  
  86.    IMPORTANT: Never edit the config files under /usr/lib/news directly.
  87.    Always edit the files in inn-1.4/site (so keep sources online!) and run
  88.    `make install' in the inn-1.4/site directory to update the files under
  89.    /usr/lib/news.
  90.  
  91.    The site directory of this inn-1.4-linux distribution contains all
  92.    config files I had to (or wanted to) change:
  93.  
  94.    control.ctl    Determines how control messages are handled. In my
  95.         control.ctl newgroups are always honored; rmgroups are
  96.         mailed to the news administrator.
  97.  
  98.    expire.ctl    Determines expiration. Read the manual page.
  99.  
  100.    hosts.nntp    IMPORTANT: The host where innd will be running *must* be
  101.         listed here if you are not using Unix Domain Sockets
  102.         (which is the case on Linux).
  103.  
  104.         In my case I had to add adv.win.tue.nl.
  105.  
  106.    innd.conf    I set domain (win.tue.nl), organization and server
  107.         (adv.win.tue.nl, where innd will be running) here.
  108.         Fromhost and pathost default to `adv.win.tue.nl' which
  109.         will be used in From: lines and in the Path: line.
  110.  
  111.    newsfeeds    This file determines outgoing feeds. Please read the
  112.         manual page!
  113.  
  114.         In the ME entry I use !* as the default feed, which means
  115.         that feeds get no groups by default.  Individual entries
  116.         for other sites override this default.
  117.  
  118.         The entry for svin09 says that all groups (except junk)
  119.         and all distributions (except local) should be fed to
  120.         svin09.
  121.  
  122.         A special feed @overview is for the overchan program,
  123.         which updates the News Overview (NOV) database used by
  124.         modern newsreaders. Uncomment this if you don't want NOV.
  125.  
  126.    nnrp.access    I added my local host adv.win.tue.nl which has read and
  127.         post access for all groups. Post access is the most
  128.         important because I do reading from /usr/spool/news.
  129.  
  130.    overview.fmt    This determines the format of the .overview (NOV) files. I
  131.         uncommented the Xref:full line because it makes trn 3.*
  132.         faster.
  133.  
  134.    send-uucp    I added the -z flag to UUXFLAGS so that my newshost does
  135.         not send reports by email about each rnews execution.
  136.  
  137.    You can use these files by copying them to the inn-1.4/site directory.
  138.  
  139.    After editing these files (and maybe other files too) for your local
  140.    situation you should run a `make install' in the inn-1.4/site directory.
  141.    This installs the changed files under /usr/lib/news. If you want to
  142.    change any other files later, edit them in inn-1.4/site and do a `make
  143.    install' afterwards. In some cases you will need to shutdown or pause
  144.    innd. Read the docs and the FAQ for more information.
  145.  
  146.    INN has now been installed.
  147.  
  148.    I have rnews installed in /usr/lib/news/rnews so I had to make a
  149.    symlink from /bin/rnews to /usr/lib/news/inews.
  150.  
  151.    Outgoing news is stored in /usr/spool/news/out.going/site where site is
  152.    a file and not a directory (like Cnews). Delete any old directories
  153.    before running INN.  If you're running uucp, make sure you have
  154.    `HAVE_UUSTAT DO' in config.data or outgoing batching will die.
  155.  
  156.    When you have no active file, BUILD will make one. Otherwise it uses
  157.    the existing one in /usr/lib/news (possibly the one from Cnews).
  158.  
  159.    Make a mail aliases for `news' if you want another user (e.g., root or
  160.    yourself) to receive the daily reports.
  161.  
  162.    Be sure *NOT* to have a line for nntp in your inetd config file
  163.    (/etc/inetd.conf). The startup scripts rc.news opens the NNTP port and
  164.    gives it to innd.
  165.  
  166.  
  167. Running INN
  168. -----------
  169.  
  170. When experimenting with INN it is always useful to have a `tail -f
  171. /var/log/syslog' running.
  172.  
  173. To start INN you have to execute the /usr/lib/news/etc/rc.news script as
  174. root(!). You can add this to your /etc/rc.local.
  175.  
  176. To create an initial NOV database you have to run `expireover -a' (as
  177. news) when innd is running.
  178.  
  179. You should now be able to post news in a test group (groups can be created
  180. by the ctlinnd command, see manual page) when your Pnews (or whatever)
  181. script uses INN's /usr/lib/news/inews program. If the old inews was also
  182. in /usr/lib/news than everything should work fine. Check /usr/lib/news/log
  183. whether the posting arrived (this can take a minute). You can also take a
  184. look at /usr/spool/news/group/name/ to check whether the posting has been
  185. stored on disk. When you have outgoing feeds, you can check
  186. /usr/spool/news/out.going/* for the article you just posted.
  187.  
  188. If everything seems to work locally, call your UUCP host or enable NNTP
  189. newsfeeding and watch the log files and syslog files.
  190.  
  191.  
  192. Crontab
  193. -------
  194.  
  195. You will need a crontab for the user `news' which does the daily expire
  196. and other maintanance.
  197.  
  198. Here's mine:
  199.  
  200. -----------------------------------------------------------------------------
  201. # news crontab
  202. #
  203. # min hour day month dayofweek (1=Mo,7=Su) command
  204. SHELL=/bin/sh
  205. PATH=/bin:/usr/bin:/usr/local/bin
  206.  
  207. # both bash-1.12 and ash need a '< /dev/null'
  208. # bash-1.13cwru does not need it
  209. 10 23 * * * /usr/lib/news/rnews -U < /dev/null
  210. 15 23 * * * /usr/lib/news/bin/news.daily expireover delayrm < /dev/null
  211. -----------------------------------------------------------------------------
  212.  
  213. rnews -U processes any news batches which could not be unbatched because
  214. innd was not running. The `expireover' keyword must be present if you are
  215. using NOV.
  216.  
  217. I run (as user `news') the news batching command
  218.  
  219.     /usr/lib/news/send-uucp svin09
  220.  
  221. in a script uupoll which makes batches and starts uucico for my newshost
  222. svin09. You can add a similar command to the news crontab if you want
  223. batching at regular times and not only when polling with the UUCP host.
  224.  
  225.  
  226. NNTP news reading
  227. -----------------
  228.  
  229. After putting the local host adv.win.tue.nl in hosts.nntp, no NNTP news
  230. reading is possible anymore from host adv.win.tue.nl unless the news
  231. reader knows the `mode reader' command (the NNTP version of trn 3.2 works
  232. OK). See the INN FAQ for more information.
  233.  
  234.  
  235. Bourne shell
  236. ------------
  237.  
  238. INN depends on a good Bourne shell compatible shell. When first installing
  239. INN I was using bash 1.12 as /bin/sh (like most people do). I found a lot
  240. of errors (not only with INN) when using this bash 1.12 as /bin/sh. After
  241. reporting these to Chet Ramey (one of the authors of Bash) he gave me
  242. access to a beta version of bash 1.13. This new bash is not for general
  243. distribution (yet), but it is *very* good at emulating the Bourne shell
  244. (the best emulation I know). I do not know when it will be released
  245. officially.
  246.  
  247. For the time being, you have to use NetBSD's ash for Linux or bash 1.12
  248. with some patches described below.
  249.  
  250. * NetBSD ash (Linux port 0.1, available at ftp.win.tue.nl) works OK for
  251.   news.daily in the crontab when adding a </dev/null at the end (otherwise
  252.   it hangs on some `uniq' command). It handles newgroup and other control
  253.   messages without any problems.
  254.  
  255. * Bash 1.12 does not work OK for news.daily. You have to apply the
  256.   bash-1.12-fd3.diff patch (after the bash-1.12-linux.diff by Rick
  257.   Sladkey) to get a new bash 1.12. This bash also needs a </dev/null at
  258.   the end of the news.daily line in the crontab (like ash, see above).
  259.  
  260.   Remaining problem with this bash 1.12 is that it does not handle
  261.   newgroup and other control messages correctly. You have to change all
  262.   occurences of:
  263.  
  264.   ##  Some shells don't pass in $* unless we explicitly pass it in here.
  265.   ##  =()<. @<_PATH_PARSECTL>@ "$@">()=
  266.   . /usr/lib/news/parsecontrol "$@"
  267.  
  268.   to
  269.  
  270.   ##  Some shells don't pass in $* unless we explicitly pass it in here.
  271.   ##  =()<. @<_PATH_PARSECTL>@>()=
  272.   . /usr/lib/news/parsecontrol
  273.  
  274.   in all control message handling scripts (newgroup, rmgroup, sendsys
  275.   etc.) in inn-1.4/site followed by a `make install' in the same directory.
  276.  
  277. If you want to be safe, I would suggest using a patched bash 1.12 with
  278. changed newgroup, rmgroup etc. scripts.
  279.  
  280.     Arjan de Vet
  281.     Department of Mathematics and Computing Science
  282.     Eindoven University of Technology
  283.     The Netherlands
  284.     devet@adv.win.tue.nl
  285.